/*
 *
-30	2	6	10	120	550	840	
-30	2	6	10	120	550	840	
 */
#include <iostream>
#include <algorithm>
#include <list>
#include <vector>
using namespace std;  
int main(void){
    
	int a1[] ={10,2,-30, 840,550,6,120};    
    sort(a1, a1+7);
    for(int i=0; i<7; i++){
        cout << a1[i] << "\t";
    }
    cout << endl;
    
	int a2[] ={10,2,-30, 840,550,6,120};    
    vector<int> V;
    vector<int>::iterator it;
    for(int i=0; i<7; i++){
        V.push_back(a2[i]);
    }
    sort(V.begin(), V.end());
    for(it=V.begin(); it!=V.end(); it++){
        cout << *it << "\t";
    }
    cout << endl;
    return 0;
}
